home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / libg_261.zip / libg_261 / libio / tests / Makefile.in < prev    next >
Makefile  |  1994-08-31  |  6KB  |  196 lines

  1. # Copyright (C) 1993 Free Software Foundation
  2. # This file is part of the GNU IO Library.  This library is free
  3. # software; you can redistribute it and/or modify it under the
  4. # terms of the GNU General Public License as published by the
  5. # Free Software Foundation; either version 2, or (at your option)
  6. # any later version.
  7. # This library is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  10. # GNU General Public License for more details.
  11. # You should have received a copy of the GNU General Public License
  12. # along with GNU CC; see the file COPYING.  If not, write to
  13. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  14.  
  15. srcdir = .
  16.  
  17. CFLAGS = -g
  18. C_FLAGS = $(CFLAGS) -I. -I.. -I$(srcdir) -I$(srcdir)/..
  19. CXXFLAGS = -g
  20. CC = gcc
  21. CXX = gcc
  22.  
  23. #### package, host, target, and site dependent Makefile fragments come in here.
  24. ##
  25.  
  26. STDIO_LD_FLAGS = -u __cleanup
  27.  
  28. #LIBS = ../../libg++.a
  29.  
  30. #LIBSTDIO = ../stdio/libstdio++.a
  31. #LIBIO = ../libio.a
  32.  
  33. #STDIOLIBS = $(STDIO_LD_FLAGS) $(LIBSTDIO) $(LIBIO) $(LIBS)
  34. STDIOLIBS = $(LIBSTDIO) $(LIBIO) $(LIBS)
  35. IOLIBS = ../libiostream.a ../../libiberty/libiberty.a
  36. IOSTDIOLIB = ../libio.a ../../libiberty/libiberty.a
  37.  
  38. DEPEND_SOURCES = $(srcdir)/*.C
  39.  
  40. .PHONY: check check-iostream check-stdio
  41. check: check-iostream check-iostdio
  42.  
  43.  
  44. # These are tests written in C++, that test the iostream facility.
  45. check-iostream: check-tFile check-tiomisc \
  46.    check-hounddog check-putbackdog check-tiomanip
  47.  
  48. # These are tests written in C, that don't need C++.
  49. # They test libio's emulation of stdio.
  50. check-iostdio: check-tiformat check-tfformat check-tstdiomisc
  51.  
  52. # check-stdio runs test programs that use stdio.
  53. # These aren't run by default because there may be linker tricks needed
  54. # to build them (if libc.a contains a competing stdio implementation).
  55.  
  56. check-stdio: check-tfseek check-twrseek check-trdseek check-tpopen
  57.  
  58. # See ${MOSTLYCLEAN} in configure.in
  59. JUNK_TO_CLEAN = tFile tiomisc hounddog putbackdog tiomanip \
  60.    t?format *.out streamfile ftmp*
  61.  
  62. .PHONY: info
  63. info:
  64. .PHONY: clean-info
  65. clean-info:
  66. .PHONY: install-info
  67. install-info:
  68.  
  69. tst: tst.o
  70.     gcc -v -o tst tst.o $(STDIOLIBS)
  71.  
  72. tgetl: tgetl.o
  73.     $(CXX) -o tgetl tgetl.o $(IOLIBS)
  74.  
  75. tFile: tFile.o
  76.     $(CXX) -o tFile tFile.o $(IOLIBS)
  77.  
  78. tiomisc: tiomisc.o
  79.     $(CXX) -o tiomisc tiomisc.o $(IOLIBS)
  80.  
  81. hounddog: hounddog.o
  82.     $(CXX) -o hounddog hounddog.o $(IOLIBS)
  83.  
  84. check-hounddog: hounddog
  85.     ./hounddog <$(srcdir)/hounddog.inp > hounddog.out 2>&1
  86.     diff -c hounddog.out $(srcdir)/hounddog.exp
  87.     ./hounddog -b0 <$(srcdir)/hounddog.inp > hound-b0.out 2>&1
  88.     diff -c hound-b0.out $(srcdir)/hounddog.exp
  89.     ./hounddog -b2 <$(srcdir)/hounddog.inp > hound-b2.out 2>&1
  90.     diff -c hound-b2.out $(srcdir)/hounddog.exp
  91.  
  92. putbackdog: putbackdog.o
  93.     $(CXX) -o putbackdog putbackdog.o $(IOLIBS)
  94.  
  95. check-putbackdog-regular: putbackdog
  96.     ./putbackdog <$(srcdir)/hounddog.inp > putback.out 2>&1
  97.     diff -c putback.out $(srcdir)/hounddog.exp
  98. check-putbackdog-nobuf: putbackdog
  99.     ./putbackdog -b0 <$(srcdir)/hounddog.inp > putback-b0.out 2>&1
  100.     diff -c putback-b0.out $(srcdir)/hounddog.exp
  101. check-putbackdog-buf2: putbackdog
  102.     ./putbackdog -b2 <$(srcdir)/hounddog.inp > putback-b2.out 2>&1
  103.     diff -c putback-b2.out $(srcdir)/hounddog.exp
  104. check-putbackdog: \
  105.   check-putbackdog-regular check-putbackdog-nobuf check-putbackdog-buf2
  106.  
  107. tfseek: tfseek.o
  108.     $(CC) -o tfseek tfseek.o $(STDIOLIBS)
  109.  
  110. check-tfseek: tfseek
  111.     ./tfseek SEEK_SET fopen > tfseek-set-fopen.out 2>&1
  112.     diff -c tfseek-set-fopen.out $(srcdir)/tfseek-set.exp
  113.     ./tfseek SEEK_SET freopen > tfseek-set-freopen.out 2>&1
  114.     diff -c tfseek-set-freopen.out $(srcdir)/tfseek-set.exp
  115.     ./tfseek SEEK_CUR fopen > tfseek-cur-fopen.out 2>&1
  116.     diff -c tfseek-cur-fopen.out $(srcdir)/tfseek-cur.exp
  117.     ./tfseek SEEK_CUR freopen > tfseek-cur-freopen.out 2>&1
  118.     diff -c tfseek-cur-freopen.out $(srcdir)/tfseek-cur.exp
  119.  
  120. twrseek: twrseek.o
  121.     $(CC) -o twrseek twrseek.o $(STDIOLIBS)
  122.  
  123. check-twrseek: twrseek
  124.     ./twrseek > twrseek.out 2>&1
  125.     diff -c twrseek.out $(srcdir)/twrseek.exp
  126.  
  127. trdseek: trdseek.o
  128.     $(CC) -o trdseek -v trdseek.o $(STDIOLIBS)
  129.  
  130. check-trdseek: trdseek
  131.     ./trdseek
  132.  
  133. check-tFile-regular: tFile
  134.     ./tFile < $(srcdir)/tFile.inp > tFile.out 2>&1
  135.     diff -c tFile.out $(srcdir)/tFile.exp
  136. # Run tFile with cout.rdbuf() unbuffered.
  137. check-tFile-nobuf: tFile
  138.     ./tFile -b0 < $(srcdir)/tFile.inp > tFile-buf0.out 2>&1
  139.     diff -c tFile-buf0.out $(srcdir)/tFile.exp
  140. # Run tFile with a 3-byte buffer for cout.rdbuf().
  141. check-tFile-buf3: tFile
  142.     ./tFile -b3 < $(srcdir)/tFile.inp > tFile-buf3.out 2>&1
  143.     diff -c tFile-buf3.out $(srcdir)/tFile.exp
  144. check-tFile: check-tFile-regular check-tFile-nobuf check-tFile-buf3
  145.  
  146. check-tiomisc: tiomisc
  147.     ./tiomisc >tiomisc.out 2>&1
  148.     diff -c tiomisc.out $(srcdir)/tiomisc.exp
  149.  
  150. tiomanip: tiomanip.o
  151.     $(CXX) -o tiomanip tiomanip.o $(IOLIBS)
  152. check-tiomanip: tiomanip
  153.     ./tiomanip >tiomanip.out 2>&1
  154.     diff -c tiomanip.out $(srcdir)/tiomanip.exp
  155.  
  156. tfformat: $(srcdir)/tfformat.c
  157.     $(CC) $(C_FLAGS) -DTEST_LIBIO -DTEST_EXACTNESS \
  158.       -o tfformat $(srcdir)/tfformat.c $(IOSTDIOLIB)
  159.  
  160. check-tfformat: tfformat
  161.     ./tfformat
  162.  
  163. tiformat: $(srcdir)/tiformat.c
  164.     $(CC) $(C_FLAGS) -DTEST_LIBIO -o tiformat $(srcdir)/tiformat.c $(IOSTDIOLIB)
  165.  
  166. check-tiformat: tiformat
  167.     ./tiformat
  168.  
  169. tstdiomisc: tstdiomisc.o
  170.     $(CC) -o tstdiomisc tstdiomisc.o $(IOSTDIOLIB)
  171.  
  172. check-tstdiomisc: tstdiomisc
  173.     ./tstdiomisc >tstdiomisc.out 2>&1
  174.     diff -c tstdiomisc.out $(srcdir)/tstdiomisc.exp
  175.  
  176. tpopen: tpopen.o
  177.     $(CC) -o tpopen tpopen.o $(STDIOLIBS)
  178.  
  179. check-tpopen: tpopen
  180.     ./tpopen > tpopen.out 2>&1
  181.     diff -c tpopen.out $(srcdir)/tpopen.exp
  182.  
  183. trwseek: trwseek.o
  184.     $(CC) -o trwseek trwseek.o $(STDIOLIBS)
  185.  
  186. check-trwseek: trwseek
  187.     ./trwsseek  TMP r+ k w o
  188.  
  189. foo: foo.o
  190.     $(CXX) -o foo foo.o $(STDIOLIBS)
  191. foo+: foo+.o
  192.     $(CXX) -o foo+ foo+.o $(IOLIBS)
  193.